import login from '../api/login';
import loginOut from '../api/loginOut';
import User from '../api/user';
import menu from '../api/menu';
import Role from '../api/role';
import Class from '../api/class';
import School from '../api/school';
import Student from '../api/student';
import koaBody from 'koa-body'
import TemplateAdd from '../api/TemplateAdd';
import Template from '../api/TemplateList';
import TemplateUploadFiles from '../api/TemplateUploadFiles';
import TemplateDownLoad from '../api/TemplateDown';
import Screen from '../api/screen';
import logList from '../api/log';
import classLog from '../api/classLog'



export default [
  {
    method: 'post',
    api: '/login',
    callback: [login]
  },
  {
    method: 'get',
    api: '/loginOut',
    callback: [loginOut]
  },
  {
    // 获取查看权限,显示对应的数据
    method: 'get',
    api: '/menu',
    callback: [menu]
  },
  {
    // 获取用户列表
    method: 'get',
    api: '/user/userList',
    callback: [User.userList]
  },
  {
    // 用户列表模糊搜索
    method: 'post',
    api: '/user/searchUserList',
    callback: [User.searchUserList]
  },
  {
    // 用户冻结账号
    method: 'post',
    api: '/user/userIco',
    callback: [User.userIco]
  },
  {
    // 获取黑名单列表
    method: 'get',
    api: '/user/blackUserList',
    callback: [User.blackUserList]
  },
  {
    // 黑名单列表模糊搜索
    method: 'post',
    api: '/user/searchBlackUserList',
    callback: [User.searchBlackUserList]
  },
  {
    // 黑名单解除冻结
    method: 'post',
    api: '/user/blackUserIco',
    callback: [User.blackUserIco]
  },
  {
    // 点击编辑获取对应数据
    method: 'post',
    api: '/user/getSetUser',
    callback: [User.getSetUser]
  },
  {
    // 编辑之后确定,修改数据库数据
    method: 'post',
    api: '/user/setUser',
    callback: [User.setUser]
  },
  {
    // 添加用户
    method: 'post',
    api: '/user/addUser',
    callback: [User.addUser]
  },
  {
    //  修改密码
    method: 'post',
    api: '/user/setPwd',
    callback: [User.setPwd]
  },
  {
    //*********角色********* */
    // 获取角色列表
    method: 'get',
    api: '/role/roleList',
    callback: [Role.roleList]
  },
  {
    // 角色列表模糊搜索
    method: 'post',
    api: '/role/searchRoleList',
    callback: [Role.searchRoleList]
  },
  {
    // 冻结账号
    method: 'post',
    api: '/role/roleIco',
    callback: [Role.roleIco]
  },
  {
    // 点击编辑获取对应数据
    method: 'post',
    api: '/role/getSetRole',
    callback: [Role.getSetRole]
  },
  {
    // 编辑之后确定,修改数据库数据
    method: 'post',
    api: '/role/setRole',
    callback: [Role.setRole]
  },
  {
    // 添加角色
    method: 'post',
    api: '/role/addRole',
    callback: [Role.addRole]
  },
  {
    // 角色列表黑名单解除冻结
    method: 'post',
    api: '/role/blackRoleIco',
    callback: [Role.blackRoleIco]
  },
  {
    // 通过roleid获取查看权限列表
    method: 'post',
    api: '/role/getmenulimitsData',
    callback: [Role.getmenulimitsData]
  },
  {
    //*********class********* */
    // 获取班级列表
    method: 'get',
    api: '/class/classList',
    callback: [Class.classList]
  },
  {
    // 班级列表模糊搜索
    method: 'post',
    api: '/class/searchClassList',
    callback: [Class.searchClassList]
  },
  {
    // 开课
    method: 'post',
    api: '/class/startClass',
    callback: [Class.startClass]
  },
  {
    // 结课
    method: 'post',
    api: '/class/endClass',
    callback: [Class.endClass]
  },
  {
    // 添加班级
    method: 'post',
    api: '/class/addClass',
    callback: [Class.addClass]
  },
  {
    // 学校数据获取
    method: 'get',
    api: '/school/getSchoolList',
    callback: [School.getSchoolList]
  },
  {
    // 搜索学校
    method: 'post',
    api: '/school/getSchool',
    callback: [School.getSchool]
  },
  //*******学生********* */ 
  {
    // 获取学生列表
    method: 'get',
    api: '/student/getStudentList',
    callback: [Student.getStudentList]
  },
  {
    // 获取学历列表
    method: 'get',
    api: '/student/getEducationList',
    callback: [Student.getEducationList]
  },
  {
    // 学生列表模糊搜索
    method: 'post',
    api: '/student/searchStudent',
    callback: [Student.searchStudent]
  },
  {
    // 学生列表点击编辑 获取数据 形成默认值
    method: 'post',
    api: '/student/getSetStundent',
    callback: [Student.getSetStundent]
  },
  {
    // 编辑之后确定,修改数据库数据
    method: 'post',
    api: '/student/setStudnet',
    callback: [Student.setStudnet]
  },
  {
    // 添加学生列表
    method: 'post',
    api: '/student/addStudent',
    callback: [Student.addStudent]
  },
  {
    //  获取所有教师数据
    method: 'get',
    api: '/student/getTeacherList',
    callback: [Student.getTeacherList]
  },
  {
    //  获取所有辅导员数据
    method: 'get',
    api: '/student/getCoachList',
    callback: [Student.getCoachList]
  },
  {
    //  座位表渲染
    method: 'post',
    api: '/student/getSetList',
    callback: [Student.getSetList]
  },
  {
    // 模板上传
    method: 'post',
    api: '/template/add',
    callback: [TemplateAdd]
  },
  {
    method: 'get',
    api: '/template/list',
    callback: [Template.TemplateList]
  },
  {
    method: 'post',
    api: '/template/uploadfiles',
    callback: [koaBody({
      multipart: true,
      formidable: {
        maxFieldsSize: 1024 * 1024 * 200
      }
    }), TemplateUploadFiles]
  },
  {
    method: 'post',
    api: '/template/download',
    callback: [TemplateDownLoad]
  },
  {
    method: 'post',
    api: '/template/searchTemplateList',
    callback: [Template.searchTemplateList]
  },
  {
    //  获取录屏数据列表
    method: 'get',
    api: '/screen/getScreenList',
    callback: [Screen.getScreenList]
  },
  {
    //  获取录屏数据列表
    method: 'post',
    api: '/screen/searchScreen',
    callback: [Screen.searchScreen]
  },
  {
    //  获取录屏数据列表
    method: 'post',
    api: '/screen/addScreen',
    callback: [Screen.addScreen]
  },
  {
    //  记录列表
    method: 'post',
    api: '/log/logList',
    callback: [logList]
  },
  {
    //  获取课堂情况
    method: 'post',
    api: '/classLog/classLogList',
    callback: [classLog.classLogList]
  },
  {
    //  添加课堂轻情况
    method: 'post',
    api: '/classLog/addClassLog',
    callback: [classLog.addClassLog]
  },
  {
    //  课堂记录选项卡
    method: 'post',
    api: '/classLog/searchClassCase',
    callback: [classLog.searchClassCase]
  }
]